package com.dongdongshop.controller;

import com.dongdongshop.data.Result;
import com.dongdongshop.domain.res.AdminRes;
import com.dongdongshop.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin")
public class adminController {
    @Autowired
    private AdminService adminService;

    @PostMapping("/getAdminUser")
    public Result<AdminRes> getAdminUser(@RequestParam("username") String username){
        AdminRes adminRes=adminService.getAdminUser(username);
        return Result.success(adminRes);
    }
}
